import React from "react";

export class Tabs extends React.Component {
  render() {
    return (
      <div className="tabs-order">
          {this.props.tabs.map(item => (
          <div 
          className={item.type === this.props.active ? 'on' : ''}
           key={item.id} onClick={ ()=> this.changeSortType(item.type) }
           >按{item.name}排序</div>
          ))}
          {/* <div>按{this.state.tabs[1].name}排序</div> */}
        </div>
    )
  }
}